# config/settings.py
# from pydantic import BaseSettings
from pydantic_settings import BaseSettings
from typing import Dict, Any
import os

class Settings(BaseSettings):
    # API配置
    API_HOST: str = "0.0.0.0"
    API_PORT: int = 8000
    
    # 数据库配置
    REDIS_HOST: str = "localhost"
    REDIS_PORT: int = 6379
    
    # 算法配置
    NSGA2_POPULATION_SIZE: int = 100
    NSGA2_GENERATIONS: int = 50
    SAC_LEARNING_RATE: float = 3e-4
    
    # 市场变化检测配置
    KS_TEST_ALPHA: float = 0.05
    ROLLING_WINDOW: int = 30
    
    # 计算配置
    USE_GPU: bool = True
    BATCH_SIZE: int = 32
    
    class Config:
        env_file = ".env"

settings = Settings()
